﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MaxLeaf.Platform.Contract;
using MaxLeaf.Platform.DALImplementation;
using MaxLeaf.Platform.DataContract;
using CommonsLib.Utility;
using CommonsLib.Settings;
using MaxLeaf.Platform.Functions;

namespace MaxLeaf.Platform.BLLImplementation
{
    public class TestBLL :BaseBLL, ITest
    {
        public TestBLL()
        {
            LogManager.Debug("TestBLL init ");
        }
        ITest _DAL = null;
        public virtual ITest DAL
        {
            get
            {
                if (_DAL == null)
                {
                    _DAL = new TestDAL();
                }
                return _DAL;
            }
        }
        public TestDataModel SayHello(TestDataModel user)
        {
             
                LogManager.Debug("BLL SayHello ");
              
                user.Name = string.Format("Hello {0}", user.Name);
                return user;
             
            
        }

        public string ShowError(string strName)
        {



            throw new MaxLeaf.Platform.Commons.MaxLeafException("测试：发生错误" + strName);

            
            
        }

        
    }
}
